﻿@model OMS.Models.CreateUser
@{
    ViewBag.Title = "Create New User";


}


      <div style="margin-left:80px;color:red;"><h2>@Html.ValidationSummary(true)</h2></div>
<div class="panel-text">
<h2>Create New User</h2>
    This age is appointed for creating new user for particular role
    </div>

@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
    
        @Html.AntiForgeryToken()
  

       
        

        <table class="create-user-table">
            <tr>
                <td>@Html.LabelFor(m => m.LoginName)</td>
                <td>@Html.TextBoxFor(m => m.LoginName, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.LoginName)</td>
                
            </tr>

            <tr>
                <td>@Html.LabelFor(m => m.FirstName)</td>
                <td>@Html.TextBoxFor(m => m.FirstName, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.FirstName)</td>
  
            </tr>
             <tr>
                <td>@Html.LabelFor(m => m.LastName)</td>
                <td>@Html.TextBoxFor(m => m.LastName, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.LastName)</td>
            </tr>
            <tr>
                <td> @Html.LabelFor(m => m.Password)</td>
                <td>@Html.PasswordFor(m => m.Password, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.Password)</td>
            </tr>
            <tr>
                <td>Confirm Password</td>
                <td>@Html.PasswordFor(m => m.PasswordConfirm, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.PasswordConfirm)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Email)</td>
                <td>@Html.TextBoxFor(m => m.Email, new { @class = "border" })</td>
                <td>@Html.ValidationMessageFor(m => m.Email)</td>
            </tr>
            <tr>
                <td>Region</td>
                <td>@Html.DropDownListFor(m => m.Region, new SelectList(new string[] { "North", "South", "West", "East" }), new { @style="width:160px;" })</td>
                <td>@Html.ValidationMessageFor(m => m.Region)</td>
            </tr>
            <tr>
                <td>Role</td>
                <td> 
                    @Html.RadioButtonFor(m=>m.Role,4,new { Checked = "checked" }) Customer<br />
                    @Html.RadioButtonFor(m=>m.Role,1) Administrator<br />
                    @Html.RadioButtonFor(m=>m.Role,3) Merchandiser<br />
                    @Html.RadioButtonFor(m=>m.Role,2) Supervisor<br />
                </td>
                <td>@Html.ValidationMessageFor(m => m.Role)</td>
            </tr>
        </table>
        <div style="margin-left:80px;">
                <button type="submit" name="action" value="Create" class="buttons-blue">Create</button>
                <button type="button" name="action" onclick="location.href='Index'" class="buttons-red">Cancel</button>
                <button type="reset" name="action" value="Refresh" class="buttons-yellow">Refresh</button>
            </div>
        <br />
        <br />
}
